using Microsoft.Practices.SmartClient.DisconnectedAgent;
using WinFormCD.Infrastructure.Library.TradeServiceWcf;
using System;

namespace WinFormCD.Infrastructure.Library.DSA.TradeServiceAsmx
{
    // Generated code for the web service.
    // Use this proxy to make requests to the service when working in an application that is occasionally connected
    public partial class Agent
    {
        IRequestQueue requestQueue;

        public Agent(IRequestQueue requestQueue)
        {
            this.requestQueue = requestQueue;
        }

        #region getHolding

        /// <summary>
        /// Enqueues a request to the <c>getHolding</c> web service method through the agent.
        /// </summary>
        /// <returns>The unique identifier associated with the request that was enqueued.</returns>
        public Guid getHolding(String userID, Int32 holdingID)
        {
            return getHolding(userID, holdingID, GetgetHoldingDefaultBehavior());
        }

        /// <summary>
        /// Enqueues a request to the <c>getHolding</c> web service method through the agent.
        /// </summary>
        /// <param name="behavior">The behavior associated with the offline request being enqueued.</param>
        /// <returns>The unique identifier associated with the request that was enqueued.</returns>
        public Guid getHolding(String userID, Int32 holdingID, OfflineBehavior behavior)
        {
            behavior.ReturnCallback = new CommandCallback(typeof(Callback), "OngetHoldingReturn");
            behavior.ExceptionCallback = new CommandCallback(typeof(Callback), "OngetHoldingException");

            return EnqueueRequest("getHolding", behavior, userID, holdingID);
        }

        public static OfflineBehavior GetgetHoldingDefaultBehavior()
        {
            OfflineBehavior behavior = GetAgentDefaultBehavior();
            behavior.ReturnCallback = new CommandCallback(typeof(Callback), "OngetHoldingReturn");
            behavior.ExceptionCallback = new CommandCallback(typeof(Callback), "OngetHoldingException");

            return behavior;
        }

        #endregion getHolding

        #region getMarketSummary

        /// <summary>
        /// Enqueues a request to the <c>getMarketSummary</c> web service method through the agent.
        /// </summary>
        /// <returns>The unique identifier associated with the request that was enqueued.</returns>
        public Guid getMarketSummary()
        {
            return getMarketSummary(GetgetMarketSummaryDefaultBehavior());
        }

        /// <summary>
        /// Enqueues a request to the <c>getMarketSummary</c> web service method through the agent.
        /// </summary>
        /// <param name="behavior">The behavior associated with the offline request being enqueued.</param>
        /// <returns>The unique identifier associated with the request that was enqueued.</returns>
        public Guid getMarketSummary(OfflineBehavior behavior)
        {
            behavior.ReturnCallback = new CommandCallback(typeof(Callback), "OngetMarketSummaryReturn");
            behavior.ExceptionCallback = new CommandCallback(typeof(Callback), "OngetMarketSummaryException");

            return EnqueueRequest("getMarketSummary", behavior);
        }

        public static OfflineBehavior GetgetMarketSummaryDefaultBehavior()
        {
            OfflineBehavior behavior = GetAgentDefaultBehavior();
            behavior.ReturnCallback = new CommandCallback(typeof(Callback), "OngetMarketSummaryReturn");
            behavior.ExceptionCallback = new CommandCallback(typeof(Callback), "OngetMarketSummaryException");

            return behavior;
        }

        #endregion getMarketSummary

        #region getTopOrders

        /// <summary>
        /// Enqueues a request to the <c>getTopOrders</c> web service method through the agent.
        /// </summary>
        /// <returns>The unique identifier associated with the request that was enqueued.</returns>
        public Guid getTopOrders(String userID)
        {
            return getTopOrders(userID, GetgetTopOrdersDefaultBehavior());
        }

        /// <summary>
        /// Enqueues a request to the <c>getTopOrders</c> web service method through the agent.
        /// </summary>
        /// <param name="behavior">The behavior associated with the offline request being enqueued.</param>
        /// <returns>The unique identifier associated with the request that was enqueued.</returns>
        public Guid getTopOrders(String userID, OfflineBehavior behavior)
        {
            behavior.ReturnCallback = new CommandCallback(typeof(Callback), "OngetTopOrdersReturn");
            behavior.ExceptionCallback = new CommandCallback(typeof(Callback), "OngetTopOrdersException");

            return EnqueueRequest("getTopOrders", behavior, userID);
        }

        public static OfflineBehavior GetgetTopOrdersDefaultBehavior()
        {
            OfflineBehavior behavior = GetAgentDefaultBehavior();
            behavior.ReturnCallback = new CommandCallback(typeof(Callback), "OngetTopOrdersReturn");
            behavior.ExceptionCallback = new CommandCallback(typeof(Callback), "OngetTopOrdersException");

            return behavior;
        }

        #endregion getTopOrders

        #region sellEnhanced

        /// <summary>
        /// Enqueues a request to the <c>sellEnhanced</c> web service method through the agent.
        /// </summary>
        /// <returns>The unique identifier associated with the request that was enqueued.</returns>
        public Guid sellEnhanced(String userID, Int32 holdingID, Double quantity)
        {
            return sellEnhanced(userID, holdingID, quantity, GetsellEnhancedDefaultBehavior());
        }

        /// <summary>
        /// Enqueues a request to the <c>sellEnhanced</c> web service method through the agent.
        /// </summary>
        /// <param name="behavior">The behavior associated with the offline request being enqueued.</param>
        /// <returns>The unique identifier associated with the request that was enqueued.</returns>
        public Guid sellEnhanced(String userID, Int32 holdingID, Double quantity, OfflineBehavior behavior)
        {
            behavior.ReturnCallback = new CommandCallback(typeof(Callback), "OnsellEnhancedReturn");
            behavior.ExceptionCallback = new CommandCallback(typeof(Callback), "OnsellEnhancedException");

            return EnqueueRequest("sellEnhanced", behavior, userID, holdingID, quantity);
        }

        public static OfflineBehavior GetsellEnhancedDefaultBehavior()
        {
            OfflineBehavior behavior = GetAgentDefaultBehavior();
            behavior.ReturnCallback = new CommandCallback(typeof(Callback), "OnsellEnhancedReturn");
            behavior.ExceptionCallback = new CommandCallback(typeof(Callback), "OnsellEnhancedException");

            return behavior;
        }

        #endregion sellEnhanced

        #region isOnline

        /// <summary>
        /// Enqueues a request to the <c>isOnline</c> web service method through the agent.
        /// </summary>
        /// <returns>The unique identifier associated with the request that was enqueued.</returns>
        public Guid isOnline()
        {
            return isOnline(GetisOnlineDefaultBehavior());
        }

        /// <summary>
        /// Enqueues a request to the <c>isOnline</c> web service method through the agent.
        /// </summary>
        /// <param name="behavior">The behavior associated with the offline request being enqueued.</param>
        /// <returns>The unique identifier associated with the request that was enqueued.</returns>
        public Guid isOnline(OfflineBehavior behavior)
        {
            behavior.ReturnCallback = new CommandCallback(typeof(Callback), "OnisOnlineReturn");
            behavior.ExceptionCallback = new CommandCallback(typeof(Callback), "OnisOnlineException");

            return EnqueueRequest("isOnline", behavior);
        }

        public static OfflineBehavior GetisOnlineDefaultBehavior()
        {
            OfflineBehavior behavior = GetAgentDefaultBehavior();
            behavior.ReturnCallback = new CommandCallback(typeof(Callback), "OnisOnlineReturn");
            behavior.ExceptionCallback = new CommandCallback(typeof(Callback), "OnisOnlineException");

            return behavior;
        }

        #endregion isOnline

        #region login

        /// <summary>
        /// Enqueues a request to the <c>login</c> web service method through the agent.
        /// </summary>
        /// <returns>The unique identifier associated with the request that was enqueued.</returns>
        public Guid login(String userID, String password)
        {
            return login(userID, password, GetloginDefaultBehavior());
        }

        /// <summary>
        /// Enqueues a request to the <c>login</c> web service method through the agent.
        /// </summary>
        /// <param name="behavior">The behavior associated with the offline request being enqueued.</param>
        /// <returns>The unique identifier associated with the request that was enqueued.</returns>
        public Guid login(String userID, String password, OfflineBehavior behavior)
        {
            behavior.ReturnCallback = new CommandCallback(typeof(Callback), "OnloginReturn");
            behavior.ExceptionCallback = new CommandCallback(typeof(Callback), "OnloginException");

            return EnqueueRequest("login", behavior, userID, password);
        }

        public static OfflineBehavior GetloginDefaultBehavior()
        {
            OfflineBehavior behavior = GetAgentDefaultBehavior();
            behavior.ReturnCallback = new CommandCallback(typeof(Callback), "OnloginReturn");
            behavior.ExceptionCallback = new CommandCallback(typeof(Callback), "OnloginException");

            return behavior;
        }

        #endregion login

        #region getOrders

        /// <summary>
        /// Enqueues a request to the <c>getOrders</c> web service method through the agent.
        /// </summary>
        /// <returns>The unique identifier associated with the request that was enqueued.</returns>
        public Guid getOrders(String userID)
        {
            return getOrders(userID, GetgetOrdersDefaultBehavior());
        }

        /// <summary>
        /// Enqueues a request to the <c>getOrders</c> web service method through the agent.
        /// </summary>
        /// <param name="behavior">The behavior associated with the offline request being enqueued.</param>
        /// <returns>The unique identifier associated with the request that was enqueued.</returns>
        public Guid getOrders(String userID, OfflineBehavior behavior)
        {
            behavior.ReturnCallback = new CommandCallback(typeof(Callback), "OngetOrdersReturn");
            behavior.ExceptionCallback = new CommandCallback(typeof(Callback), "OngetOrdersException");

            return EnqueueRequest("getOrders", behavior, userID);
        }

        public static OfflineBehavior GetgetOrdersDefaultBehavior()
        {
            OfflineBehavior behavior = GetAgentDefaultBehavior();
            behavior.ReturnCallback = new CommandCallback(typeof(Callback), "OngetOrdersReturn");
            behavior.ExceptionCallback = new CommandCallback(typeof(Callback), "OngetOrdersException");

            return behavior;
        }

        #endregion getOrders

        #region getAccountData

        /// <summary>
        /// Enqueues a request to the <c>getAccountData</c> web service method through the agent.
        /// </summary>
        /// <returns>The unique identifier associated with the request that was enqueued.</returns>
        public Guid getAccountData(String userID)
        {
            return getAccountData(userID, GetgetAccountDataDefaultBehavior());
        }

        /// <summary>
        /// Enqueues a request to the <c>getAccountData</c> web service method through the agent.
        /// </summary>
        /// <param name="behavior">The behavior associated with the offline request being enqueued.</param>
        /// <returns>The unique identifier associated with the request that was enqueued.</returns>
        public Guid getAccountData(String userID, OfflineBehavior behavior)
        {
            behavior.ReturnCallback = new CommandCallback(typeof(Callback), "OngetAccountDataReturn");
            behavior.ExceptionCallback = new CommandCallback(typeof(Callback), "OngetAccountDataException");

            return EnqueueRequest("getAccountData", behavior, userID);
        }

        public static OfflineBehavior GetgetAccountDataDefaultBehavior()
        {
            OfflineBehavior behavior = GetAgentDefaultBehavior();
            behavior.ReturnCallback = new CommandCallback(typeof(Callback), "OngetAccountDataReturn");
            behavior.ExceptionCallback = new CommandCallback(typeof(Callback), "OngetAccountDataException");

            return behavior;
        }

        #endregion getAccountData

        #region getAccountProfileData

        /// <summary>
        /// Enqueues a request to the <c>getAccountProfileData</c> web service method through the agent.
        /// </summary>
        /// <returns>The unique identifier associated with the request that was enqueued.</returns>
        public Guid getAccountProfileData(String userID)
        {
            return getAccountProfileData(userID, GetgetAccountProfileDataDefaultBehavior());
        }

        /// <summary>
        /// Enqueues a request to the <c>getAccountProfileData</c> web service method through the agent.
        /// </summary>
        /// <param name="behavior">The behavior associated with the offline request being enqueued.</param>
        /// <returns>The unique identifier associated with the request that was enqueued.</returns>
        public Guid getAccountProfileData(String userID, OfflineBehavior behavior)
        {
            behavior.ReturnCallback = new CommandCallback(typeof(Callback), "OngetAccountProfileDataReturn");
            behavior.ExceptionCallback = new CommandCallback(typeof(Callback), "OngetAccountProfileDataException");

            return EnqueueRequest("getAccountProfileData", behavior, userID);
        }

        public static OfflineBehavior GetgetAccountProfileDataDefaultBehavior()
        {
            OfflineBehavior behavior = GetAgentDefaultBehavior();
            behavior.ReturnCallback = new CommandCallback(typeof(Callback), "OngetAccountProfileDataReturn");
            behavior.ExceptionCallback = new CommandCallback(typeof(Callback), "OngetAccountProfileDataException");

            return behavior;
        }

        #endregion getAccountProfileData

        #region updateAccountProfile

        /// <summary>
        /// Enqueues a request to the <c>updateAccountProfile</c> web service method through the agent.
        /// </summary>
        /// <returns>The unique identifier associated with the request that was enqueued.</returns>
        public Guid updateAccountProfile(AccountProfileDataBean profileData)
        {
            return updateAccountProfile(profileData, GetupdateAccountProfileDefaultBehavior());
        }

        /// <summary>
        /// Enqueues a request to the <c>updateAccountProfile</c> web service method through the agent.
        /// </summary>
        /// <param name="behavior">The behavior associated with the offline request being enqueued.</param>
        /// <returns>The unique identifier associated with the request that was enqueued.</returns>
        public Guid updateAccountProfile(AccountProfileDataBean profileData, OfflineBehavior behavior)
        {
            behavior.ReturnCallback = new CommandCallback(typeof(Callback), "OnupdateAccountProfileReturn");
            behavior.ExceptionCallback = new CommandCallback(typeof(Callback), "OnupdateAccountProfileException");

            return EnqueueRequest("updateAccountProfile", behavior, profileData);
        }

        public static OfflineBehavior GetupdateAccountProfileDefaultBehavior()
        {
            OfflineBehavior behavior = GetAgentDefaultBehavior();
            behavior.ReturnCallback = new CommandCallback(typeof(Callback), "OnupdateAccountProfileReturn");
            behavior.ExceptionCallback = new CommandCallback(typeof(Callback), "OnupdateAccountProfileException");

            return behavior;
        }

        #endregion updateAccountProfile

        #region logout

        /// <summary>
        /// Enqueues a request to the <c>logout</c> web service method through the agent.
        /// </summary>
        /// <returns>The unique identifier associated with the request that was enqueued.</returns>
        public Guid logout(String userID)
        {
            return logout(userID, GetlogoutDefaultBehavior());
        }

        /// <summary>
        /// Enqueues a request to the <c>logout</c> web service method through the agent.
        /// </summary>
        /// <param name="behavior">The behavior associated with the offline request being enqueued.</param>
        /// <returns>The unique identifier associated with the request that was enqueued.</returns>
        public Guid logout(String userID, OfflineBehavior behavior)
        {
            behavior.ReturnCallback = new CommandCallback(typeof(Callback), "OnlogoutReturn");
            behavior.ExceptionCallback = new CommandCallback(typeof(Callback), "OnlogoutException");

            return EnqueueRequest("logout", behavior, userID);
        }

        public static OfflineBehavior GetlogoutDefaultBehavior()
        {
            OfflineBehavior behavior = GetAgentDefaultBehavior();
            behavior.ReturnCallback = new CommandCallback(typeof(Callback), "OnlogoutReturn");
            behavior.ExceptionCallback = new CommandCallback(typeof(Callback), "OnlogoutException");

            return behavior;
        }

        #endregion logout

        #region buy

        /// <summary>
        /// Enqueues a request to the <c>buy</c> web service method through the agent.
        /// </summary>
        /// <returns>The unique identifier associated with the request that was enqueued.</returns>
        public Guid buy(String userID, String symbol, Double quantity, Int32 orderProcessingMode)
        {
            return buy(userID, symbol, quantity, orderProcessingMode, GetbuyDefaultBehavior());
        }

        /// <summary>
        /// Enqueues a request to the <c>buy</c> web service method through the agent.
        /// </summary>
        /// <param name="behavior">The behavior associated with the offline request being enqueued.</param>
        /// <returns>The unique identifier associated with the request that was enqueued.</returns>
        public Guid buy(String userID, String symbol, Double quantity, Int32 orderProcessingMode, OfflineBehavior behavior)
        {
            behavior.ReturnCallback = new CommandCallback(typeof(Callback), "OnbuyReturn");
            behavior.ExceptionCallback = new CommandCallback(typeof(Callback), "OnbuyException");

            return EnqueueRequest("buy", behavior, userID, symbol, quantity, orderProcessingMode);
        }

        public static OfflineBehavior GetbuyDefaultBehavior()
        {
            OfflineBehavior behavior = GetAgentDefaultBehavior();
            behavior.ReturnCallback = new CommandCallback(typeof(Callback), "OnbuyReturn");
            behavior.ExceptionCallback = new CommandCallback(typeof(Callback), "OnbuyException");

            return behavior;
        }

        #endregion buy

        #region sell

        /// <summary>
        /// Enqueues a request to the <c>sell</c> web service method through the agent.
        /// </summary>
        /// <returns>The unique identifier associated with the request that was enqueued.</returns>
        public Guid sell(String userID, Int32 holdingID, Int32 orderProcessingMode)
        {
            return sell(userID, holdingID, orderProcessingMode, GetsellDefaultBehavior());
        }

        /// <summary>
        /// Enqueues a request to the <c>sell</c> web service method through the agent.
        /// </summary>
        /// <param name="behavior">The behavior associated with the offline request being enqueued.</param>
        /// <returns>The unique identifier associated with the request that was enqueued.</returns>
        public Guid sell(String userID, Int32 holdingID, Int32 orderProcessingMode, OfflineBehavior behavior)
        {
            behavior.ReturnCallback = new CommandCallback(typeof(Callback), "OnsellReturn");
            behavior.ExceptionCallback = new CommandCallback(typeof(Callback), "OnsellException");

            return EnqueueRequest("sell", behavior, userID, holdingID, orderProcessingMode);
        }

        public static OfflineBehavior GetsellDefaultBehavior()
        {
            OfflineBehavior behavior = GetAgentDefaultBehavior();
            behavior.ReturnCallback = new CommandCallback(typeof(Callback), "OnsellReturn");
            behavior.ExceptionCallback = new CommandCallback(typeof(Callback), "OnsellException");

            return behavior;
        }

        #endregion sell

        #region getHoldings

        /// <summary>
        /// Enqueues a request to the <c>getHoldings</c> web service method through the agent.
        /// </summary>
        /// <returns>The unique identifier associated with the request that was enqueued.</returns>
        public Guid getHoldings(String userID)
        {
            return getHoldings(userID, GetgetHoldingsDefaultBehavior());
        }

        /// <summary>
        /// Enqueues a request to the <c>getHoldings</c> web service method through the agent.
        /// </summary>
        /// <param name="behavior">The behavior associated with the offline request being enqueued.</param>
        /// <returns>The unique identifier associated with the request that was enqueued.</returns>
        public Guid getHoldings(String userID, OfflineBehavior behavior)
        {
            behavior.ReturnCallback = new CommandCallback(typeof(Callback), "OngetHoldingsReturn");
            behavior.ExceptionCallback = new CommandCallback(typeof(Callback), "OngetHoldingsException");

            return EnqueueRequest("getHoldings", behavior, userID);
        }

        public static OfflineBehavior GetgetHoldingsDefaultBehavior()
        {
            OfflineBehavior behavior = GetAgentDefaultBehavior();
            behavior.ReturnCallback = new CommandCallback(typeof(Callback), "OngetHoldingsReturn");
            behavior.ExceptionCallback = new CommandCallback(typeof(Callback), "OngetHoldingsException");

            return behavior;
        }

        #endregion getHoldings

        #region register

        /// <summary>
        /// Enqueues a request to the <c>register</c> web service method through the agent.
        /// </summary>
        /// <returns>The unique identifier associated with the request that was enqueued.</returns>
        public Guid register(String userID, String password, String fullname, String address, String email, String creditcard, Decimal openBalance)
        {
            return register(userID, password, fullname, address, email, creditcard, openBalance, GetregisterDefaultBehavior());
        }

        /// <summary>
        /// Enqueues a request to the <c>register</c> web service method through the agent.
        /// </summary>
        /// <param name="behavior">The behavior associated with the offline request being enqueued.</param>
        /// <returns>The unique identifier associated with the request that was enqueued.</returns>
        public Guid register(String userID, String password, String fullname, String address, String email, String creditcard, Decimal openBalance, OfflineBehavior behavior)
        {
            behavior.ReturnCallback = new CommandCallback(typeof(Callback), "OnregisterReturn");
            behavior.ExceptionCallback = new CommandCallback(typeof(Callback), "OnregisterException");

            return EnqueueRequest("register", behavior, userID, password, fullname, address, email, creditcard, openBalance);
        }

        public static OfflineBehavior GetregisterDefaultBehavior()
        {
            OfflineBehavior behavior = GetAgentDefaultBehavior();
            behavior.ReturnCallback = new CommandCallback(typeof(Callback), "OnregisterReturn");
            behavior.ExceptionCallback = new CommandCallback(typeof(Callback), "OnregisterException");

            return behavior;
        }

        #endregion register

        #region getClosedOrders

        /// <summary>
        /// Enqueues a request to the <c>getClosedOrders</c> web service method through the agent.
        /// </summary>
        /// <returns>The unique identifier associated with the request that was enqueued.</returns>
        public Guid getClosedOrders(String userID)
        {
            return getClosedOrders(userID, GetgetClosedOrdersDefaultBehavior());
        }

        /// <summary>
        /// Enqueues a request to the <c>getClosedOrders</c> web service method through the agent.
        /// </summary>
        /// <param name="behavior">The behavior associated with the offline request being enqueued.</param>
        /// <returns>The unique identifier associated with the request that was enqueued.</returns>
        public Guid getClosedOrders(String userID, OfflineBehavior behavior)
        {
            behavior.ReturnCallback = new CommandCallback(typeof(Callback), "OngetClosedOrdersReturn");
            behavior.ExceptionCallback = new CommandCallback(typeof(Callback), "OngetClosedOrdersException");

            return EnqueueRequest("getClosedOrders", behavior, userID);
        }

        public static OfflineBehavior GetgetClosedOrdersDefaultBehavior()
        {
            OfflineBehavior behavior = GetAgentDefaultBehavior();
            behavior.ReturnCallback = new CommandCallback(typeof(Callback), "OngetClosedOrdersReturn");
            behavior.ExceptionCallback = new CommandCallback(typeof(Callback), "OngetClosedOrdersException");

            return behavior;
        }

        #endregion getClosedOrders

        #region getQuote

        /// <summary>
        /// Enqueues a request to the <c>getQuote</c> web service method through the agent.
        /// </summary>
        /// <returns>The unique identifier associated with the request that was enqueued.</returns>
        public Guid getQuote(String symbol)
        {
            return getQuote(symbol, GetgetQuoteDefaultBehavior());
        }

        /// <summary>
        /// Enqueues a request to the <c>getQuote</c> web service method through the agent.
        /// </summary>
        /// <param name="behavior">The behavior associated with the offline request being enqueued.</param>
        /// <returns>The unique identifier associated with the request that was enqueued.</returns>
        public Guid getQuote(String symbol, OfflineBehavior behavior)
        {
            behavior.ReturnCallback = new CommandCallback(typeof(Callback), "OngetQuoteReturn");
            behavior.ExceptionCallback = new CommandCallback(typeof(Callback), "OngetQuoteException");

            return EnqueueRequest("getQuote", behavior, symbol);
        }

        public static OfflineBehavior GetgetQuoteDefaultBehavior()
        {
            OfflineBehavior behavior = GetAgentDefaultBehavior();
            behavior.ReturnCallback = new CommandCallback(typeof(Callback), "OngetQuoteReturn");
            behavior.ExceptionCallback = new CommandCallback(typeof(Callback), "OngetQuoteException");

            return behavior;
        }

        #endregion getQuote

        #region Common

        public static OfflineBehavior GetAgentDefaultBehavior()
        {
            OfflineBehavior behavior = new OfflineBehavior();
            behavior.MaxRetries = 3;
            behavior.Stamps = 1;
            behavior.Expiration = DateTime.Now + new TimeSpan(1, 0, 0, 0);
            behavior.ProxyFactoryType = typeof(Microsoft.Practices.SmartClient.DisconnectedAgent.WebServiceProxyFactory);

            return behavior;
        }

        private Guid EnqueueRequest(string methodName, OfflineBehavior behavior, params object[] arguments)
        {
            Request request = CreateRequest(methodName, behavior, arguments);

            requestQueue.Enqueue(request);

            return request.RequestId;
        }

        private static Request CreateRequest(string methodName, OfflineBehavior behavior, params object[] arguments)
        {
            Request request = new Request();
            request.MethodName = methodName;
            request.Behavior = behavior;
            request.CallParameters = arguments;

            request.OnlineProxyType = OnlineProxyType;
            request.Endpoint = Endpoint;

            return request;
        }

        public static Type OnlineProxyType
        {
            get
            {
                return typeof(WinFormCD.Infrastructure.Library.TradeServiceWcf.TradeServiceAsmx);
            }
        }

        public static string Endpoint
        {
            get
            {
                return String.Empty;
            }
        }
        #endregion
    }
}
